import request from '@/utils/request'

// 查询聊天列表列表
export function listUserchat(query) {
  return request({
    url: '/userchat/userchat/list',
    method: 'get',
    params: query
  })
}

// 查询聊天列表详细
export function getUserchat(chatId) {
  return request({
    url: '/userchat/userchat/' + chatId,
    method: 'get'
  })
}

// 新增聊天列表
export function addUserchat(data) {
  return request({
    url: '/userchat/userchat',
    method: 'post',
    data: data
  })
}

// 修改聊天列表
export function updateUserchat(data) {
  return request({
    url: '/userchat/userchat',
    method: 'put',
    data: data
  })
}

// 删除聊天列表
export function delUserchat(chatId) {
  return request({
    url: '/userchat/userchat/' + chatId,
    method: 'delete'
  })
}
